package com.serverTechnology.config;

import com.github.xiaoymin.knife4j.spring.extension.OpenApiExtensionResolver;
import com.serverTechnology.resource.entity.CommonEntity;
import io.swagger.annotations.ApiOperation;
import org.springframework.context.annotation.Bean;
import org.springframework.web.bind.annotation.RequestMethod;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;

import javax.annotation.Resource;

/**
 * @Author 王烁烁
 * @Date 2024/7/28
 */
public class TechnologyConfig {
//    @Resource
//    private OpenApiExtensionResolver openApiExtensionResolver;
//
//    @Bean(value = "server-technology")
//    public Docket systemDocApi() {
//        return new Docket(DocumentationType.SWAGGER_2)
//                .apiInfo(new ApiInfoBuilder()
//                        .title("工艺模块")
//                        .description("工艺模块server-technology")
//                        .termsOfServiceUrl("")
//                        .contact(new Contact("server-provider","", ""))
//                        .version("2.0.0")
//                        .build())
//                .globalResponseMessage(RequestMethod.GET, CommonEntity.responseList())
//                .globalResponseMessage(RequestMethod.POST, CommonEntity.responseList())
//                .groupName("com.serverTechnology.resource")
//                .select()
//                .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
//                .apis(RequestHandlerSelectors.basePackage("com.serverTechnology.resource"))
//                .paths(PathSelectors.any())
//                .build().extensions(openApiExtensionResolver.buildExtensions("工艺模块server-technology"));
//    }
}
